package com.zhanglu.fun.services.website.login;

import com.zhanglu.fun.services.website.common.ResultResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * @description
 * @Auther zhanglu
 * @Date 2017/9/20 下午3:58
 */
@RestController
public class LoginRouter {

    @Autowired
    private LoginService loginService;

    @GetMapping("/login")
    public ResultResponse login(HttpServletResponse httpServletResponse, @RequestParam("username") String account, @RequestParam("password") String password) {
        return loginService.login(httpServletResponse, account, password);
    }
}
